using Mathmall.Administration.common;
using Mathmall.Administration.Models;
using Mathmall.Administration.Vo;

namespace Mathmall.Administration.Service;

public interface IAttrGroupService
{
    /// <summary>
    /// 新增属性分组
    /// </summary>
    /// <param name="attrGroupVo"></param>
    /// <returns></returns>
    Task<int> AddAttrGroup(AttrGroupVo attrGroupVo);

    /// <summary>
    /// 分页查询
    /// </summary>
    /// <param name="pageIndex"></param>
    /// <param name="pageSize"></param>
    /// <param name="condition">模糊查询条件</param>
    /// <param name="categoryId">分类id</param>
    /// <returns></returns>
    Task<PaginatedList<AttrGroupVo>> PaginatedQuery(int pageIndex, int pageSize, string condition, int categoryId);

    /// <summary>
    /// 根据id查询属性分组
    /// </summary>
    /// <param name="attrGroupID"></param>
    /// <returns></returns>
    Task<AttrGroupVo> GetAttrGroupById(int attrGroupID);

    /// <summary>
    /// 修改属性分组
    /// </summary>
    /// <param name="attrGroupVo"></param>
    /// <returns></returns>
    Task<int> UpdateAttrGroup(AttrGroupVo attrGroupVo);

    /// <summary>
    /// 删除属性分组
    /// </summary>
    /// <param name="attrGroupIDs"></param>
    /// <returns></returns>
    Task<int> DeleteAttrGroup(List<int> attrGroupIDs);

    /// <summary>
    /// 根据分类id查询属性分组
    /// </summary>
    /// <param name="catalogId"></param>
    /// <returns></returns>
    Task<List<AttrGroupVo>> GetAttrGroupsByCatalogID(int catalogId);

    /// <summary>
    /// 根据属性id查询属性分组
    /// </summary>
    /// <param name="attrID"></param>
    /// <returns></returns>
    Task<AttrGroupVo> GetAttrGroupByAttrId(int attrID);
}